home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
program
/
mkutil21.zip
/
BIN
/
BUILD.BAT
< prev
next >
Wrap
DOS Batch File
|
1995-02-06
|
8KB
|
287 lines
@echo off
rem Generic batch file to build a version of the library. This batch file
rem assumes that the correct batch files exist to setup the appropriate
rem compilation environments, and that the DMAKE.EXE program is available
rem somewhere on the path.
rem
rem If you specify the parameter 'copy' first on the command line, the
rem object files wil be copied in and out of temporary directories so that
rem you can re-build a bunch of libraries quickly without needing to do
rem a full re-compile (this takes up a _lot_ of space however!). If the
rem directories do not exist, they are created.
rem Unset all environment variables that change the compile process
set DBG=
set OPT=
set FPU=
set CHECKS=
rem Check if the copy command is first, and if so shift it into %0
if %1==copy shift
if %1==all goto doall
if %1==bc3 goto bc3
if %1==bc16 goto bc16
if %1==bc32 goto bc32
if %1==vc16 goto vc16
if %1==vc32 goto vc32
if %1==sc16 goto sc16
if %1==sc32 goto sc32
if %1==wc16 goto wc16
if %1==wc32 goto wc32
if %1==hc32 goto hc32
if %1==dj32 goto dj32
if %1==em32 goto em32
echo Usage: BUILD [copy] compiler_name [DMAKE commands]
echo.
echo Current compilers: Extenders:
echo bc3 - Borland C++ 3.1 16 bit
echo bc16 - Borland C++ 4.5 16 bit
echo bc32 - Borland C++ 4.5 32 bit (DPMI32,TNT)
echo vc16 - Microsoft Visual C++ 1.5 16 bit
echo vc32 - Microsoft Visual C++ 1.0 32 bit (TNT)
echo sc16 - Symantec C++ 6.1 16 bit
echo sc32 - Symantec C++ 6.1 32 bit (DOSX,TNT,X-32)
echo wc16 - Watcom C++ 10.0 16 bit
echo wc32 - Watcom C++ 10.0 32 bit (DOS4GW,TNT,X-32)
echo hc32 - Metaware High C++ 3.21 32 bit (TNT)
rem echo dj32 - DJGPP port of GNU C++ 32 bit (GO32)
echo.
echo This batch file will build all libraries with full optimisations
echo turned on. If you specify 'all' all compiler versions will be built.
echo You can pass commands to DMAKE.EXE on the command line. You can set the
echo following evironment variable to change the default DOS extender:
echo USE_TNT=1 - Use Phar Lap TNT DOS Extender
echo USE_X32=1 - Use FlashTek X-32 DOS Extender
echo USE_X32VM=1 - Use FlashTek X-32VM DOS Extender
goto end
:doall
rem -------------------------------------------------------------------------
rem Compile for Borland C++ 3.1 16 bit library
:bc3
32rtm
call bc3-vars.bat
dmake cleanexe
if NOT %0==copy goto bc3copied
if NOT EXIST bc3 mkdir bc3
copy bc3\*.obj
:bc3copied
dmake install %2 %3 %4 %5 %6 %7 %8 %9
32rtm -U
if NOT %0==copy goto bc3done
copy *.obj bc3
:bc3done
if errorlevel 1 goto errorend
if not %1==all goto done
rem -------------------------------------------------------------------------
rem Compile for Borland C++ 4.5 16 bit library
:bc16
32rtm
call bc16-vars.bat
dmake cleanexe
if NOT %0==copy goto bc16copied
if NOT EXIST bc16 mkdir bc16
copy bc16\*.obj
:bc16copied
dmake install %2 %3 %4 %5 %6 %7 %8 %9
32rtm -U
if NOT %0==copy goto bc16done
copy *.obj bc16
:bc16done
if errorlevel 1 goto errorend
if not %1==all goto done
rem -------------------------------------------------------------------------
rem Compile for Borland C++ 4.5 32 bit library
:bc32
if %USE_TNT%==1 goto bc32tnt
call bc32-vars.bat
goto dobc32
:bc32tnt
call bc32-tnt.bat
:dobc32
32rtm
dmake cleanexe
if NOT %0==copy goto bc32copied
if NOT EXIST bc32 mkdir bc32
copy bc32\*.obj
:bc32copied
dmake install %2 %3 %4 %5 %6 %7 %8 %9
32rtm -U
if NOT %0==copy goto bc32done
copy *.obj bc32
:bc32done
if errorlevel 1 goto errorend
if not %1==all goto done
rem -------------------------------------------------------------------------
rem Compile for Microsoft Visual C++ 1.5 16 bit library
:vc16
call vc16-vars.bat
dmake cleanexe
if NOT %0==copy goto vc16copied
if NOT EXIST vc16 mkdir vc16
copy vc16\*.obj
:vc16copied
dmake install %2 %3 %4 %5 %6 %7 %8 %9
if NOT %0==copy goto vc16done
copy *.obj vc16
:vc16done
if errorlevel 1 goto errorend
if not %1==all goto done
rem -------------------------------------------------------------------------
rem Compile for Microsoft Visual C++ 1.0 32 bit library
:vc32
call vc32-vars.bat
dmake cleanexe
if NOT %0==copy goto vc32copied
if NOT EXIST vc32 mkdir vc32
copy vc32\*.obj
:vc32copied
dmake install %2 %3 %4 %5 %6 %7 %8 %9
if NOT %0==copy goto vc32done
copy *.obj vc32
:vc32done
if errorlevel 1 goto errorend
if not %1==all goto done
rem -------------------------------------------------------------------------
rem Compile for Symantec C++ 6.1 16 bit library
:sc16
call sc16-vars.bat
dmake cleanexe
if NOT %0==copy goto sc16copied
if NOT EXIST sc16 mkdir sc16
copy sc16\*.obj
:sc16copied
dmake install %2 %3 %4 %5 %6 %7 %8 %9
if NOT %0==copy goto sc16done
copy *.obj sc16
:sc16done
if errorlevel 1 goto errorend
if not %1==all goto done
rem -------------------------------------------------------------------------
rem Compile for Symantec C++ 6.1 32 bit library
:sc32
if %USE_TNT%==1 goto sc32tnt
if %USE_X32%==1 goto sc32x32
call sc32-vars.bat
goto dosc32
:sc32tnt
call sc32-tnt.bat
goto dosc32
:sc32x32
call sc32-x32.bat
:dosc32
if NOT %0==copy goto sc32copied
if NOT EXIST sc32 mkdir sc32
copy sc32\*.obj
:sc32copied
dmake install %2 %3 %4 %5 %6 %7 %8 %9
if NOT %0==copy goto sc32done
copy *.obj sc32
:sc32done
if errorlevel 1 goto errorend
if not %1==all goto done
rem -------------------------------------------------------------------------
rem Compile for Watcom C++ 10.0 16 bit library
:wc16
call wc16-vars.bat
dmake cleanexe
if NOT %0==copy goto wc16copied
if NOT EXIST wc16 mkdir wc16
copy wc16\*.obj
:wc16copied
dmake install %2 %3 %4 %5 %6 %7 %8 %9
if NOT %0==copy goto wc16done
copy *.obj wc16
:wc16done
if errorlevel 1 goto errorend
if not %1==all goto done
rem -------------------------------------------------------------------------
rem Compile for Watcom C++ 10.0 32 bit library
:wc32
if %USE_TNT%==1 goto wc32tnt
if %USE_X32%==1 goto wc32x32
call wc32-vars.bat
goto dowc32
:wc32tnt
call wc32-tnt.bat
goto dowc32
:wc32x32
call wc32-x32.bat
:dowc32
dmake cleanexe
if NOT %0==copy goto wc32copied
if NOT EXIST wc32 mkdir wc32
copy wc32\*.obj
:wc32copied
dmake install %2 %3 %4 %5 %6 %7 %8 %9
if NOT %0==copy goto wc32done
copy *.obj wc32
:wc32done
if errorlevel 1 goto errorend
if not %1==all goto done
rem -------------------------------------------------------------------------
rem Compile for Metaware High C++ 3.21 32 bit library
:hc32
call hc32-vars.bat
dmake cleanexe
if NOT %0==copy goto hc32copied
if NOT EXIST hc32 mkdir hc32
copy hc32\*.obj
:hc32copied
dmake install %2 %3 %4 %5 %6 %7 %8 %9
if NOT %0==copy goto hc32done
copy *.obj hc32
:hc32done
if errorlevel 1 goto errorend
if not %1==all goto done
rem -------------------------------------------------------------------------
rem Compile for DJGPP port of GNU C++ 32 bit library
:dj32
goto dj32done
call dj32-vars.bat
dmake cleanexe
if NOT %0==copy goto dj32copied
if NOT EXIST dj32 mkdir dj32
copy dj32\*.obj
:dj32copied
dmake install %2 %3 %4 %5 %6 %7 %8 %9
if NOT %0==copy goto dj32done
copy *.obj dj32
:dj32done
if errorlevel 1 goto errorend
if not %1==all goto done
:done
echo Done!
goto end
:errorend
echo *************************************************
echo * An error occurred while building the library. *
echo *************************************************
:end